<html>
<head><meta charset="utf-8"><title>Make iterate yield a PlaceElem · t-compiler/wg-mir-opt · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/index.html">t-compiler/wg-mir-opt</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Make.20iterate.20yield.20a.20PlaceElem.html">Make iterate yield a PlaceElem</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="168522251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Make%20iterate%20yield%20a%20PlaceElem/near/168522251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Make.20iterate.20yield.20a.20PlaceElem.html#168522251">(Jun 19 2019 at 16:33)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> was telling me that <span class="user-mention" data-user-id="120791">@RalfJ</span> suggested somewhere to make <code>iterate</code> yield a <code>PlaceElem</code></p>



<a name="168522275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Make%20iterate%20yield%20a%20PlaceElem/near/168522275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Make.20iterate.20yield.20a.20PlaceElem.html#168522275">(Jun 19 2019 at 16:33)</a>:</h4>
<p>for now that doesn't seem to be possible <a href="https://github.com/rust-lang/rust/blob/44fb88d25282d9362774536965f2455f677734f3/src/librustc_mir/borrow_check/place_ext.rs#L58" target="_blank" title="https://github.com/rust-lang/rust/blob/44fb88d25282d9362774536965f2455f677734f3/src/librustc_mir/borrow_check/place_ext.rs#L58">https://github.com/rust-lang/rust/blob/44fb88d25282d9362774536965f2455f677734f3/src/librustc_mir/borrow_check/place_ext.rs#L58</a></p>



<a name="168524715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Make%20iterate%20yield%20a%20PlaceElem/near/168524715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Make.20iterate.20yield.20a.20PlaceElem.html#168524715">(Jun 19 2019 at 17:02)</a>:</h4>
<p>hm that's an odd iteration. so that looks at all the "intermediate types"?</p>



<a name="168524752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Make%20iterate%20yield%20a%20PlaceElem/near/168524752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Make.20iterate.20yield.20a.20PlaceElem.html#168524752">(Jun 19 2019 at 17:02)</a>:</h4>
<p>oh but only after a <code>Deref</code></p>



<a name="168524792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Make%20iterate%20yield%20a%20PlaceElem/near/168524792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Make.20iterate.20yield.20a.20PlaceElem.html#168524792">(Jun 19 2019 at 17:03)</a>:</h4>
<p>yeah I can see that with <code>Deref</code> being a projection this might be hard</p>



<a name="168527196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Make%20iterate%20yield%20a%20PlaceElem/near/168527196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Make.20iterate.20yield.20a.20PlaceElem.html#168527196">(Jun 19 2019 at 17:27)</a>:</h4>
<p>This makes me worried we'll hit this anyway when moving to slices</p>



<a name="168527213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Make%20iterate%20yield%20a%20PlaceElem/near/168527213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Make.20iterate.20yield.20a.20PlaceElem.html#168527213">(Jun 19 2019 at 17:27)</a>:</h4>
<p>but with slices we can take subslices, so it may not be a problem after all</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>